package org.klarton.filter;

import java.util.ArrayList;
import java.util.List;

/**
 * This filter bank is a collection of filters.
 * It delegates reading sample values to its filters.
 */
public class FilterBank {

    private final List<Filter> filters = new ArrayList<Filter>();

    public void addFilter(Filter filter) {
        filters.add(filter);
    }

    public void read(double... sample) {
        for (Filter filter : filters) {
            filter.read(sample);
        }
    }

    public List<Filter> getFilters() {
        return filters;
    }
}
